<?php
include_once("../configs/admin.config.inc.php");//--> admin global var
include_once("db.inc.php");						//--> db global var
include_once("Operation.php");					//--> Operation
include_once("Pic.php");						//--> Pic
require_once("controlHeader.php");				//--> system control header

$objOperate		= new Operation($objSession->session['lan']);			//--> Operation instance
$objPic			= new Pic($objSession->session['lan'], $uid);			//--> Pic

$arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);

if(isset($_GET['id']) && !empty($_GET['id'])){
	$id 	= $_GET['id'];

	$isReturn = $objPic->editStatus($arrOperate, $id, "unapproved");
	if($isReturn)
		$error_message = 'Stop successfully.';
	else 
		$error_message = 'Stop failure.';
}

echo "<script language='javascript'>";
echo "alert(\"$error_message\");";
echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";";
echo "</script>";

//$backurl = $_SERVER['HTTP_REFERER'];
//header("Location: $backurl");
?>
